package com.qingke.mybatis;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import com.qingke.mybatis.mapping.BlogMapper;
import com.qingke.pojo.Blog;

public class App4 {

	public static void main(String[] args) {
		
		SqlSession session = SessionManager.getInstance().getSession();
		BlogMapper mapper = session.getMapper(BlogMapper.class);
		
		List<Blog> blogs = mapper.selectAllBlogs();
		session.commit();
		session.close();
		for (Blog b: blogs) {
			System.out.println(b);
		}
	}
	
}
